//
//  NewCell.m
//  夺宝吧
//
//  Created by xiaocai on 15/8/6.
//  Copyright (c) 2015年 FangYuan. All rights reserved.
//

#import "NewCell.h"

@interface NewCell ()
{
    __weak IBOutlet UIImageView *img;
    __weak IBOutlet UILabel *titleLab;
    __weak IBOutlet UILabel *timeLab;
}
@end
@implementation NewCell

- (void)awakeFromNib {
    // Initialization code
    [self addSubview:[WYPublic getFenGexian:0 :self.frame.size.height - 0.5 :WYMWITH :0.5]];
}

- (void)fillCellWithModel:(NewsModel *)model
{
    if (model.isScanfedFlag) {
        img.image = [UIImage imageNamed:@"new_press"];
        titleLab.textColor = [UIColor darkGrayColor];
        timeLab.textColor = [UIColor darkGrayColor];
        
    }else{
        img.image = [UIImage imageNamed:@"new_normal"];
        titleLab.textColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"db_blu_color"]];
        timeLab.textColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"db_blu_color"]];
    }
    titleLab.text = model.news_title;
    timeLab.text = model.news_time;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
